package com.yidu.best.bond.bondMarket.controller;

import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.yidu.best.basicSetup.exchange.util.IDUtil;
import com.yidu.best.bond.bondMarket.domain.BondMarket;
import com.yidu.best.bond.bondMarket.domain.BondMarketVo;
import com.yidu.best.bond.bondMarket.service.BondMarketService;

@Controller
@RequestMapping("/Bond/")
public class BondMarketController {
	@Autowired
	private BondMarketService bondMarketService;

	@RequestMapping(value = "getBondValueOfAssessment", method = RequestMethod.GET)
	public String getBondMarket() {
		return "bond/bond/valueOfAssessment";
	}

	@ResponseBody
	@RequestMapping(value = "BondMarket", method = RequestMethod.GET)
	public Map<String, Object> doBondMarket(BondMarketVo bondMarketVo) {
		Map<String, Object> map = bondMarketService.findPageQuery(bondMarketVo);
		return map;
	}

	@ResponseBody
	@RequestMapping(value = "BondMarket", method = RequestMethod.POST)
	public int uploadBondMarket(@RequestParam(value = "file") MultipartFile file) throws Exception {
		return bondMarketService.insertBondMarket(file);

	}

}
